<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of sfWidgetFormDateCustom
 *
 * @author Cleiton
 */
class sfWidgetFormDateCustom extends sfWidgetFormDate
{
  protected function configure($options = array(), $attributes = array())
  {
    $this->addOption('format', '%day%/%month%/%year%');
    $this->addOption('days', parent::generateTwoCharsRange(1, 31));
    $this->addOption('months', parent::generateTwoCharsRange(1, 12));
    $years = range(date('Y') - 80, date('Y') + 5);
    $this->addOption('years', array_combine($years, $years));

    $this->addOption('can_be_empty', true);
    $this->addOption('empty_values', array('year' => '', 'month' => '', 'day' => ''));
  }
}

?>
